package pojo;

public class AjaxResult {
    private boolean success;
    private String message;
    public AjaxResult() {}

    public AjaxResult(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public static AjaxResult success(String message) {
        return new AjaxResult(true, message);
    }

    public static AjaxResult error(String message) {
        return new AjaxResult(false, message);
    }

    // getters and setters
    public boolean isSuccess() { return success; }
    public void setSuccess(boolean success) { this.success = success; }
    public String getMessage() { return message; }
    public void setMessage(String message) { this.message = message; }
}